<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="../static/vue/2.6.10/vue.js" type="text/javascript"></script>
    <title>slot</title>
</head>
<body>
    <div id="app">
        <base-layout>
            <template v-slot:header>
                <h1>Here might be a page title</h1>
            </template>

            <template v-slot:default>
                <p>A paragraph for the main content.</p>
                <p>And another one.</p>
            </template>

            <template v-slot:footer>
                <p>Here's some contact info</p>
            </template>
        </base-layout>
    </div>
</body>
<script type="text/javascript">
    Vue.component('base-layout', {
        template: `
    <div>
        <header>
            <slot name="header"></slot>
        </header>
        <main>
            <slot></slot>
        </main>
        <footer>
            <slot name="footer"></slot>
        </footer>
    </div>
  `
    });

    let vm = new Vue({
        el: '#app'
    })
</script>
</html>
